{% if count > results_per_page %}
<div class="browse-results" {% if bottompaging %}id="bottom-paging"{% endif %}>
  {% if offset > 0 %}
    {% if offset is divisibleby(results_per_page) %}
  	  {% set page_correction = (paging['current_page']-2)*results_per_page %}
  	{% else %}
  	  {% set page_correction = (paging['current_page']-1)*results_per_page %}
  	{% endif %}
  	  <a class="paging-item" href="{% if results_per_page == 20 %}search?q={{ term }}&all={{ lang_count }}&offset={% else %}{% if letter == 'A' %}{{ path_fix }}{{ vocab_id }}/{{ lang }}/index/{% endif %}{{ letter }}?offset={% endif %}{{ page_correction }}">{% trans %}Edellinen{% endtrans %}</a>
  	    
  {% endif %}
  {% for i,value in paging.pages %}
    {% if value.pagenum == paging['current_page'] and offset is divisibleby(results_per_page) %}
  	  <span class="paging-current">{{ value.pagenum }}</span>    
  	{% else %}
	  <a class="paging-item" href="{% if results_per_page == 20 %}search?q={{ term }}&all={{ lang_count }}&offset={% else %}{% if letter == 'A' %}{{ path_fix }}{{ vocab_id }}/{{ lang }}/index/{% endif %}{{ letter }}?offset={% endif %}{{ value.range }}">{{ value.pagenum }}</a>
  	{% endif %}	    
  {% endfor %}
    {% if offset + results_per_page < count %}
      <a class="paging-item" href="{% if results_per_page == 20 %}search?q={{ term }}&all={{ lang_count }}&offset={% else %}{% if letter == 'A' %}{{ path_fix }}{{ vocab_id }}/{{ lang }}/index/{% endif %}{{ letter }}?offset={% endif %}{{ paging['current_page']*results_per_page }}">{% trans %}Seuraava{% endtrans %} ></a>
  {% endif %}
</div>
{% endif %}